#include <stdio.h>
#include <stdlib.h>

void my_exit1() {
	printf("exit 1\n");
}

void my_exit2() {
	printf("exit 2\n");
}

int main() {
	if (atexit(my_exit1) != 0) {
		printf("atexit error\n");
		return -1;
	}
	
	if (atexit(my_exit1) != 0) {
		printf("atexit error\n");
		return -1;
	}

	if (atexit(my_exit2) != 0) {
		printf("atexit error\n");
		return -1;
	}

	printf("done\n");
	return 0;
}